<div class="text_field">
  <div>
    <%= form_tag update_retail_prices_peer_prices_url, 
        :remote => true,
        :method => :post  do
     %> 
      当前零售价 <%= text_field_tag :retail_prices_expression, '', :class => 'enter_to_submit' %> <b id='retail_prices_expression_validation'></b>
      <%= hidden_field_tag :type_name, params[:type_name] %>
      <%= hidden_field_tag :released_on, params[:released_on] %>
      <%= submit_tag '提交', :class => :hidden %>
    <% end %>
  </div>
  <span class='close_it'>
  <%= link_to "关闭",title_for_retail_price_peer_prices_url(:type_name => params[:type_name],:released_on => params[:released_on]),:remote => true, :method => :get, :class => 'l_crud l_close' %>
  </span>
</div>
<script type="text/javascript" charset="utf-8">
$(function() {
  $('#peer_prices_expression').observe_field(0.5, function() {
    try {
      eval("1" + $(this).val());
      $('#peer_prices_expression_validation').html('');
    } catch(error) {
      $('#peer_prices_expression_validation').html("<b class='validation_error'>计算公式不正确</b>");
    }
  });
});
</script>